package com.whcoding.test.constant;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-05-27 14:37
 *
 * @JsonFormat 注解为了解决枚举类返回前端只展示构造器名称的问题。
 **/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CellTypeEnum {

	CELL_TYPE_STRING("STRING", 1),
	CELL_TYPE_NUMERIC("NUMERIC", 2),
	CELL_TYPE_BOOLEAN("BOOLEAN", 3),
	CELL_TYPE_BLANK("BLANK", 4),
	CELL_TYPE_FORMULA("FORMULA", 5);

	private String name;
	private Integer code;

	CellTypeEnum(String name, Integer code) {
		this.name = name;
		this.code = code;
	}

	public String getName() {
		return name;
	}
	public Integer getCode() {
		return code;
	}
}
